﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CreateTechnologyConsultingControl.aspx.cs" Inherits="Portal.Web.Admin.Article.CreateTechnologyConsultingControl" %>

<div id="jqeasyui-form-create-technologyconsulting" class="jqeasyui-form">
    <form id="create-technologyconsulting-form" action="CreateSave.aspx" method="POST"
        enctype="multipart/form-data">
        <input type="hidden" name="Id" value="" />
        <input type="hidden" name="CategoryId" value="<%=Model.CategoryId %>" />
        <fieldset>
            <legend></legend>
            <p>
                <label>
                    文章标题:</label><input type="text" name="MainTitle" style="width: 400px" class="easyui-validatebox"
                        required="true" value="" />
            </p>
            <p>
                <label>
                    文章副标题:</label><input type="text" name="SubTitle" style="width: 400px" class="easyui-validatebox"
                        required="true" value="" />
            </p>
            <p style="display: none">
                <label>
                    是否推荐:</label>

                <input type="checkbox" name="IsRecommend" />

            </p>
            <p style="display: none">
                <label>
                    是否停用:</label>
                <input type="checkbox" name="IsClosed" />
            </p>
            <p>
                <label>
                    语言:</label><select id="create-technologyconsulting-culture" name="Culture" editable="false">
                    </select>
            </p>
            <p>
                <label>
                    发布时间:</label><input type="text" style="width: 200px" id="create-technologyconsulting-createtime"
                        name="CreateTime" value="<%=Model.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") %>" />
            </p>
            <p>
                <label>
                    文章内容:</label>
                <span class="span-textarea">
                    <textarea name="Content" id="create-technologyconsulting-content" style="width: 700px; height: 400px;"><%=Model.Content %></textarea>
                </span>
            </p>
            <p>
                <label>
                    &nbsp;</label>
                <input type="button" id="btn-create-technologyconsulting-submit" value="保存" />
                <input type="reset" value="重置" />
            </p>
        </fieldset>
    </form>
</div>
<script type="text/javascript">
    var createtechnologyconsultingcontenteditor;
    window.KindEditor.create('#create-technologyconsulting-content', {
        cssPath: '/Content/Common/Widget/kindeditor/plugins/code/prettify.css',
        uploadJson: '',
        fileManagerJson: '',
        allowFileManager: true, afterCreate: function () {
            createtechnologyconsultingcontenteditor = this;

        }
    });
    $('#create-technologyconsulting-createtime').datetimebox({
        showSeconds: false
    });
    $('#create-technologyconsulting-culture').combobox({
        data: CultureComboboxJsonData,
        valueField: 'id',
        textField: 'text'
    });
    $('#btn-create-technologyconsulting-submit').click(function () {
        createtechnologyconsultingcontenteditor.sync();
        $.ajax({
            type: "POST",
            url: "Article/CreateSave",
            data: $("#create-technologyconsulting-form").serialize(),
            success: function (msg) {
                AjaxMessage(msg);
                if (msg.state)
                    if (TechnologyConsultingTable != undefined)
                        try {
                            TechnologyConsultingTable.datagrid("reload");
                        } catch (e) {

                        }

            },
            error: function () {
                $.messager.alert('错误', '添加失败！', "error");
            }
        });
    });
</script>
